Skip to content

feat: tool approval for agents: settings and grants on an agent's tools, migrate hop to agent chart 3.0 - #483

Merged
Rotfuks merged 46 commits into
mainfrom
tool-approval
Nov 30, 2026
Merged

Rotfuks merged 46 commits into
mainfrom
tool-approval

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Milestones 1 to 3 are on this branch, plus one later addition: the agent's display name in the session binding (marked "after milestone 3").

Part of giantswarm/giantswarm#38902. The review record is the first comment on this PR, with an update comment for the later work and a record of the review round of 2026-11-27 (Quentin).

What does this PR do?

muster now decides Allow, Ask or Block for every tool call (giantswarm/muster, linked below). This PR is agent-manager's part of it.

Area What changes
Chart default (milestone 1) muster.mcpServer.approval renders spec.approval on the muster MCPServer with rule: Allow and one entry per tool (34 tools, all Allow, the same effect as today; includes update_agent_access, set_agent_approval and list_approval_grants). approval: null clears it; {} does not (Helm merges). A Go drift test compares the map with the server's registered tools.
Approval settings on an agent's tool list (milestone 2) An agent's tools map each tool to Allow, Ask or Block, and default (Ask or Block) covers the rest. get_agent reports toolSettings, defaultApproval, grants, approvalSettings, approvalEnforced and generation; get_agent's tools keeps its meaning (new data is under new fields).
Split update tools update_agent takes only descriptive fields; the tool list, skills, plugins, egress, connectors, Harness, toolchains and refreshSkills go to update_agent_access, the settings and default to set_agent_approval. Writes take expectedGeneration and refuse a stale one. The chart picks tools or toolset by the target release's chart and warns instead of failing.
Grants An Allow over a connector's Ask is an exception only a connector admin of that connector may grant (set_agent_approval, checked against muster's filter_tools). Grants are agent-manager's own records: a ConfigMap per agent in a grants namespace of its own (internal/approvalgrants), read with list_approval_grants. A save by anyone else, an agent's deletion and a rebuilt connector drop them; revocation is retried durably and reaches running Sessions. A grant never lifts a floor or the governed default.
Session binding start_session sends the agent's settings, default and grants to muster's session bindings API with agent-manager's own projected ServiceAccount token (audience muster) beside the person's. Bindings sender-written can't be overwritten without the sender. On by default (muster.toolApproval.enabled); while off agent-manager refuses settings and the sessions of agents that carry them (fail closed). The bindings URL can be https with its own CA (muster.bindingsCA).
Migrate 2.x to 3.x (milestone 3) agent-manager migrate gets the hop that rewrites muster.requireApproval to default: Ask before the agent chart's line moves to 3.0. It reads everything before writing, never writes values it cannot follow, and holds a source's releases behind a sibling's diff: a GitOps release gets a diff, never a write; a valuesFrom release is reported, never overwritten; organization namespaces are covered: the releases migrate owns are rewritten by the managed rules (GitOps ones get the diff and hold their siblings), the report is written in every organization namespace (also for sources on another registry, found by chart name) and an organization is marked ready, naming the releases the mark covers, once every release there is on 3.x values; the operator moves the source on that mark only; next-major pre-releases and ranges that span majors are refused; re-running is a no-op. An agent with requireApproval is bound with default: Ask already on 2.x.
Release lookup at a Session start (milestone 2, found by a manual test) The release whose settings a Session binds is found by the Agent's Flux labels (else the release named after the agent) and must render that very Agent. The platform lists the releases that render its own agents (muster.toolApproval.platformReleases, release to Agent; a Role grants get by name): such an agent binds only that release and is refused with other or missing labels; any other agent accepts a labelled release only in its own namespace under its own name. For an agent whose release is on another cluster the settings come from agent-manager's own configuration (platformAgents); the live objects can only refuse. A start refused after kagent made its Session answers a conflict that names a new request id.
Display name (after milestone 3) A session's binding also carries the Agent's display-name annotation, so muster can name the agent in approval prompts; muster takes it only from this sender-bound binding, never from the agent's request.
Docs docs/tool-approval.md, docs/tools.md, api/openapi.yaml, README.

Commits: milestone 1 9576419, 65ec338, 38af12f, b4ca50d, 1ac78a6 (chart default, Block rule, README, drift test); milestone 2 33e414d..b107856, e437dbb (grants, settings, split tools, session sync, fail-closed fixes); milestone 3 e12845b..d7e8044, a56072e, 9396637, 0356597 (migrate hop, its fix rounds, organization releases and the ready mark); fdae6d1, 984f2d8, c1d8abb, cd3b3a1 (release lookup, platform releases, remote target, the labels check); after milestone 3: 04af9ca (normalize values.schema.json), 9f903f4 (the display name in the binding), dec1567 (docs condensed); review round of 2026-11-27: 355df4b (grant recheck fails closed), d244752, 48ed659 (range limit), 2f67c08 (UID and generation in the ready mark), b6240d0 (docs link). Tip 2f67c08.

What is the effect of this change to users?

  • Without settings every tool stays Allow, as before.
  • An agent can carry per-tool settings; a tool that asks does not run until the person approves, and a connector admin may grant an exception.
  • Callers of update_agent that send the tool list, skills, plugins and so on get a refusal that names the tool to use (update_agent_access).
  • Agents that used muster.requireApproval keep asking: the migrate hop moves them to default: Ask ahead of the chart 3.0 (see the agent chart's PR).

How does it look like?

Not a visual change. Rendered MCPServer:

spec:
  approval:
    rule: Allow
    tools:
      <tool name>: Allow

set_agent_approval as a connector admin, with get_info Ask on the connector: the answer carries the grant {entry, server, connectorUid, grantedBy, generation, tools: [get_info]}.

Changes from the plan

Where this PR differs from the design in the epic (giantswarm/giantswarm#38902):

  • Chart default. muster.mcpServer.approval accepts rule: Block as well.
  • Chart header and fail-closed binding. The agent chart renders settings as X-Muster-Tool-Approval as well as binding them; agent-manager's binding is on by default, and it refuses settings and session starts where it can bind none, instead of rendering nothing.
  • tools or toolset. agent-manager writes tools or the deprecated toolset by the target chart's schema and refuses settings for a chart without tools, so agents on older chart lines keep working.
  • Field names. get_agent and list_agents keep tools as the kagent bindings; the list is toolSettings with defaultApproval, grants, approvalSettings, approvalEnforced and generation. Update tools take expectedGeneration.
  • Grants. Records are one ConfigMap per agent in a grants namespace of their own, keyed by the HelmRelease UID, read with list_approval_grants; a grant names the tools it covered, and a tool that asks later isn't lifted.
  • Saves. update_agent_access accepts an unchanged carried-over Allow over an Ask (the save drops its grant unless the saver is a connector admin). An agent's set_agent_approval records the grants its own call names and drops the rest.
  • Clearing. A dropped grant reaches running Sessions through PATCH /session-bindings/grants, retried until it lands, instead of through a bind.
  • Binding. The bindings API is on muster's own port; a bind without the sender over a sender-written binding is refused.
  • Migrate. An agent that sets muster.requireApproval: true is bound with default: Ask already on 2.x, so it is asked by kagent and by muster until migrate rewrites it. The hop also writes modelConfig.name when unset, holds (with a diff) a release whose source is pinned, git-owned, external or an organization's, reports a valuesFrom release without writing it, and covers organization namespaces with a ready mark that the operator waits for.
  • Release lookup. The release whose settings a Session binds is found by the Agent's Flux labels and must render that very Agent; a platform-rendered agent binds only the release the platform lists for it (refused with other or missing labels); an agent whose release is on another cluster binds from agent-manager's own configuration. A start refused after kagent made its Session answers a conflict naming a new request id.
  • Release floors (agentChartV3Floor) are unset until real releases exist.
  • Display name. The binding carries the Agent's display name beside its technical name, so muster's prompt can name the agent in plain words; muster never takes the name from the agent's own request.
  • A start fails closed on its grant recheck. If the grants cannot be read after the bind, cannot be marked pending or keep conflicting, the start is refused, the session unbound and deleted, instead of handing out a session with a grant that a concurrent save just revoked.
  • The ready mark is bound to the releases. migrate records each release's UID and generation in the organization's ready mark; the operator moves the chart source only if they still match (agent-platform-operator#74).
  • Range grammar. Target chart ranges that admit a major of 100 or more are refused; shared classifier fixtures are a follow-up.
  • Direct A2A clients. A session created directly over A2A has no muster binding (giantswarm/giantswarm#39569); this PR does not claim that arbitrary A2A clients work.
  • Delivery. One pull request per repository carries all three milestones and the display-name addition, instead of one pull request per slice.

Any background context you can provide?

  • Epic giantswarm/giantswarm#38902, PRD slices 3, 7 and 8.
  • Needs muster's CRD with spec.approval and, for settings and grants, a muster that takes an agent's approval settings (muster's PR). Against an older muster agent-manager binds agents without settings as before and refuses the sessions of agents with settings. After muster's CRD upgrade, force-reconcile the release (flux reconcile helmrelease <name> -n <ns> --force) if it was applied while the old CRD was served.
  • The session bindings API moves to its own muster port (:8091); agent-manager's muster.bindingsUrl names it. The agent-platform chart renders both.
  • Known limits: a valuesFrom release already on 3.x is unchanged with a warning, because migrate cannot see whether requireApproval became default: Ask or was deleted (chart 3.x refuses the key); on agent chart 2.x, which renders no X-Muster-Tool-Approval header, a Session binds the older configuration until agent-manager rolls out after a release change.
  • Decisions that changed behaviour: grants are agent-manager's records, never lift floors or the governed default; approval binding on by default and fail closed when off; the session-bindings call stays in-cluster HTTP by default, with a warning only for non-cluster-local URLs and https supported; placeholders for the release floors stay unset until the real releases exist.
  • Merge after the muster release; the agent-platform PR names the safe list and governance.

Related pull requests (milestones 1 to 3)

Repository PR Role
muster giantswarm/muster#1912 enforcement, approval page, governance, agent settings and grants
backstage giantswarm/backstage#3655 portal: connector and agent tool settings, session prompt, inline approval card
klaus-gateway giantswarm/klaus-gateway#618 Slack prompt and return
agent-platform giantswarm/agent-platform#1495 governance value, safe lists, wiring, agent chart 3.x guard and migrate preflight, the portal's own client and trusted-client wiring
model-manager giantswarm/model-manager#462 chart default
vm-manager giantswarm/vm-manager#264 chart default
cluster-manager giantswarm/cluster-manager#359 chart default
workspace-manager giantswarm/workspace-manager#229 chart default
toolchain-manager giantswarm/toolchain-manager#100 chart default
skill-manager giantswarm/skill-manager#48 chart default
agent-platform-mcps giantswarm/agent-platform-mcps#108 chart defaults for the families
agent giantswarm/agent#143 agent chart 3.0: tools and default, requireApproval removed
agent-skills giantswarm/agent-skills#90 agent management skill
agent-platform-operator giantswarm/agent-platform-operator#74 organization chart source follows the configuration
giantswarm-platform-manager giantswarm/giantswarm-platform-manager#1053 governance as a typed input, second-person review
agentlab giantswarm/agentlab#1355 lab: governed mode docs, the portal's Dex client, the portal's workload token

What is needed from the reviewers?

  • Read the review record first.
  • Confirm that Allow all is the intended default for this management server on a trusted platform.
  • Check the plain-HTTP default for the bindings call (warned, in-cluster, behind muster's network policy; https supported).
  • The review fix rounds of milestones 2 and 3 (code review 0 blocker, 5 major, 12 minor, 1 nit and security 0 high, 4 medium for slice 3; 1 blocker and 5 major for slice 8) were fixed on this branch and re-checked. A delta review, a re-check, a final re-check and a last review (a second model) then covered the organization hop, the release lookup and the remote-target path: 0 high, one medium (L-01, fixed in cd3b3a1, not re-checked). The display name (9f903f4) was covered by the last check (second model; update comment in the review record); dec1567 (docs) and 04af9ca (schema formatting) were not independently re-checked. Open findings are minor and listed in the record.

Do the docs need to be updated?

Done: docs/tool-approval.md, docs/tools.md, api/openapi.yaml, the chart README rows.

Testing

Check Result
helm lint, helm template default, approval=null, rule=Block, rule=Deny, tools.bogus=maybe map rendered; none; Block renders; the others refused by the schema, naming the path
Names in the map versus the server's registered tools internal/api/helm_approval_test.go compares them; passed in the first lab re-test, CI runs it
Go unit tests for grants, settings, session sync, migrate (internal/...) added with each commit; CI is the reference
agentlab M1 re-test, 2026-11-25 passed, no blocking defects
agentlab M2, 2026-11-26 (lab-tests/m2-integration.md), agent-manager b107856 all tested cases pass: create_agent with tools; Session binds the list (Block hidden); grants granted by a connector admin and refused for a non-admin; floors and the governed Ask never lifted; list_approval_grants; saving clears and revokes in running Sessions; delete_agent cleans up; stale writes refused (conflict); binding integrity; requireApproval path through a2a; platform-test passed. Defects (M2I-2..5, M2I-8) fixed or decided in the review round; R-02 (a Session start in an organization namespace) not re-checked
agentlab M3, 2026-11-26 (lab-tests/m3-integration.md), agent-manager 6f81a3b the migrate hop on 2.x agents: requireApproval agents rewritten to default: Ask and ask through muster before and after; a running Session asks across the upgrade; a GitOps agent gets a diff and is never written; re-running is a no-op; refused ranges; platform-test 17 PASS. Defects M3I-2 and M3I-3 (a held release rewritten while its source stays on 2.x; an organization source on another registry skipped) fixed in 396abc4 and fe1fa5b; M3I-1 is the dry run's RBAC (agent-platform)
agentlab, 2026-11-26, default agent session start (lab-tests/default-agent-fix.md), agent-manager 984f2d8 a user without rights on the platform's releases starts a Session with the default agent and it answers; the platform's release patched to default: Ask is bound and a tool call asks; cleaned up
Delta, final and last reviews (a second model) go build, go vet, go test ./internal/... ./cmd/..., helm lint; 32 + 12 + 6 + 22 mutants over four passes; two PoCs reproduced L-01 before its fix

Display name (2026-11-26): lab final rollout at 9f903f4 (the prompt reads " wants to run …" and the portal view carries the name); last check: go build, go vet, go test ./internal/... pass, 3 mutants (1 killed, 2 survived without a test, LC-15). Not run: the remote-target path (c1d8abb, never in a cluster: the lab has no remote target), Flux's remediation of organization releases that fail chart 3.0's schema, helm unittest (not installed on the reviewers' machine; the suites added for platformReleases and platformAgents were not executed), the valuesFrom case in a lab (admission refuses it there; unit-tested), a real operator move of an organization's source (M2I-1 in the lab; fixed in agent-platform-operator, linked below).

Review round 2026-11-28 (355df4b..2f67c08): regression test for the failed recheck, tests for the version-bound mark and the range limit; internal/agents and internal/migrate pass in the independent re-check (envtest not run there). See "Review record — Quentin's review".

Render spec.approval on the chart's MCPServer from muster.mcpServer.approval,
with the "Allow all" preset: rule Allow and every tool of this release named
Allow. These are the platform's own management servers, called by the Dev Portal
as the signed-in person; agent callers are asked by muster's floors and the
governance mode. An installation tightens a tool in its values (Ask or Block).
Helm merges an empty map into the chart's default, so only null renders no spec.approval.
A grant is a connector admin's Allow over that connector's Ask for one
entry of one agent's tool list. The records live in a versioned ConfigMap
per agent in agent-manager's namespace, written with its ServiceAccount,
behind a Store interface a later connector manager can take over.
muster.toolApproval.enabled mounts agent-manager's projected
ServiceAccount token (audience muster), passes the muster MCP URL and the
grants namespace, grants ConfigMaps in the release namespace and, with
downstream OAuth, get on HelmReleases in the managed namespaces. The
connector approval map names the new tools.
…nd grants

Agents carry a tool list (tools, default) with Allow, Ask or Block per
entry, written where the agent chart takes it. update_agent changes what
an agent is, update_agent_access what it can reach, set_agent_approval its
settings: the only tool that grants an Allow over a connector's Ask, after
a connector-admin check per connector, checked against muster's
filter_tools. Every save drops the grants the saver is no connector admin
of (an agent's save keeps none), a grant written before a values change
past agent-manager no longer holds, and dropped grants leave running
sessions. Session binds carry the agent, its settings and live grant marks
with the approval sender token. list_approval_grants lists grants.
…nc and name the tools a grant covers

A grants record whose object name, labels or agent disagree, or that does
not decode, is skipped and logged instead of trusted or failing the whole
listing. A record carries pendingSessionSync until muster confirmed the
grants left, and is kept without grants for it. A grant records the
server's own names of the tools it covered.
…own namespace

muster.toolApproval.enabled defaults to true, so settings are never
accepted where nothing binds them. The grants live in a namespace that
holds nothing else (muster.toolApproval.grantsNamespace, created by the
chart unless createGrantsNamespace is off); the ServiceAccount's ConfigMap
Role reaches that namespace only.
…ch running sessions

- get_agent and list_agents keep tools as the kagent MCP bindings; the
  tool list is toolSettings.
- Settings are refused where agent-manager does not bind them; a session
  start is refused when settings cannot be bound (no sender, valuesFrom,
  missing release of a HelmRelease-managed agent, muster not taking them),
  and a muster without approval settings binds agents without them.
- Grant drops are retried, marked pending and sent again on the agent's
  next start, save or read; delete_agent drops the agent's marks; results
  report sessionsUpdated and warnings.
- Grants and their marks name the tools they cover; the toolset bound with
  settings is the release's own list.
- set_agent_approval refuses a list that moved while it checked; a start
  never drops a newer grant; the release's chart version decides tools.
- The split tools refuse undeclared arguments, connector-admin needs the
  caller's own identity, URL credentials are refused and redacted,
  grantedBy names a verified email, and the bindings client follows no
  redirect and binds up to 64 KiB.
get_agent and list_agents report approvalEnforced: whether the agent's
settings are bound to its sessions. list_approval_grants takes namespace
as optional: without it every managed namespace the caller may list
HelmReleases in, the others named in unreadable; each grant carries
agentDisplayName. set_agent_approval names its list toolSettings and
defaultApproval, as get_agent does.
get_agent and list_agents report the release generation; update_agent,
update_agent_access, set_agent_approval and REST PATCH take it as
expectedGeneration and refuse a write when the release moved since, checked
against the live release. Grant drops that never reached muster are swept
once at start with the sender token alone, which muster accepts without a
person's bearer; the bindings client sends a drop that way wherever no
person's token is at hand.
…ganizations and spare recreated agents' marks

- A Session start reads the agent's release as the caller where
  agent-manager's ServiceAccount may not (an organization namespace) and is
  refused only when neither may.
- list_approval_grants without a namespace and the startup sweep cover the
  organization namespaces; an organization is never named in unreadable,
  only counted in unreadableCount when it failed for another reason.
- A gone agent's pending record is sent with the grants of an agent
  recreated under the same name, so its marks are not dropped.
- Unbind sends the approval sender token: muster deletes a sender-written
  binding only for it.
- The service's Start runs the sweep; a bind's recheck compares marks with
  their tools.
…and trust a bindings CA

- A create writes tools or toolset by the chart the namespace's agent
  chart source serves, so an organization's older source gets toolset and
  settings are refused naming it instead of a failed install.
- get_agent, list_agents and create_agent report approvalEnforcement
  (enforced, not-enforced, pending) with approvalEnforced left out while
  the release has not run its current generation; a release without tools
  on an older chart is not-enforced.
- delete_agent's result names the dropped grants; the session sync log
  carries muster's bindings and dropped counts.
- list_approval_grants reviews list helmreleases before reading chart
  sources.
- Plain http to muster is warned about only outside the cluster; an https
  bindings URL can trust a CA (--muster-bindings-ca-file, chart
  muster.bindingsCA).
…roval to default: Ask

Agent chart 3.0 removes muster.requireApproval and the default of
modelConfig.name. A target range on 3.x picks the new hop: requireApproval
true becomes default: Ask where the muster binding renders, the key is
dropped, and an unset modelConfig.name is written as default-model-config,
what 2.x rendered. Each change is listed per release in the report and the
log; a GitOps-owned release gets it as a diff. requireApproval true beside
tool approval settings never rendered and fails the release. Both lines
render the same Agent, so nothing is left to delete.
A Session bound with empty settings made muster ignore the agent's
X-Muster-Tool-Approval header, so one running across the agent chart 3.0
upgrade, which drops kagent's flag, stopped asking. Such an agent's Sessions
are now bound with default: Ask while its release carries the flag.
…ource, and report organization namespaces

On the 2.x -> 3.x path a release with spec.valuesFrom is reported failed
with what to change instead of having its model overwritten; a release whose
source this run cannot move (pinned, owned by git, the platform's or an
organization's) is held pending with the diff, since no released 2.x chart
takes default. Organization namespaces are read and reported with diffs and
keep the run pending; a run that may not list them fails. requireApproval
null is dropped like false, and the report no longer lists a model it did
not set. The hop's tests validate against the 3.0 chart's own schema.
…nt-manager's configuration

With a remote target the agent-platform chart's components run on the target cluster while their HelmReleases stay on the management cluster, so agent-manager cannot read the default agent's release and refused every default-agent session. muster.toolApproval.platformAgents (flag --approval-platform-agents) now carries such an agent's release and its approval values (tools, toolset, default, muster.requireApproval), rendered by the agent-platform chart from the values it renders the release with. A session of such an agent binds those values without reading the release and without grants; it is refused when the Agent is unreadable or its Flux labels name another release, or when its RemoteMCPServer is unreadable or its X-Muster-Tool-Approval header carries other settings. Entries are validated strictly at startup and by the chart.
…t or agent-manager created it

An Agent's Flux labels are editable by whoever may edit the Agent, so they
no longer decide which release's tool approval settings a Session binds.
Platform-rendered agents (muster.toolApproval.platformReleases, now
agent -> release) bind their listed release only and are refused with
other or missing labels; any other agent binds only the release
agent-manager creates for it (its namespace, its name).
@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record

Part of giantswarm/giantswarm#38902 (tool approval, milestones 1 to 3). Purpose: this record says what was reviewed on this branch (the chart's per-tool approval defaults; approval settings, grants and split update tools on agents; the 2.x to 3.x migrate hop), by whom and with which outcome, so that reviewers can skip what is covered. Branch tool-approval is 35 commits on 88addb0, tip cd3b3a1. Hashes are those of the pushed tool-approval branch.

Read this first

  • Reviewed independently in all three milestones, with a re-check of the fixes in each: chart (Sonnet), slice 3 code and security (Sonnet, Fable, re-check Fable), agent chart 3.0 hop (Fable, re-check Fable). After that a delta review of the later commits, a re-check and a final re-check (Fable), and a last review of the default agent's release lookup and the remote-target path (Fable). 0 open blockers, majors or mediums.
  • Not independently re-checked: cd3b3a1 (the fix for L-01, pinned by a test that reproduces the finding), the docs-only and test-only commits 722a53b, 77f765e, 0c9f683.
  • Three runs in agentlab used this branch's image and chart (the milestone 3 run built the migrate image from 6f81a3b); a fourth checked the default agent's session start with the image of 984f2d8. The remote-target path (c1d8abb) and the organization hop with the operator moving the source were never run in a cluster.
  • Not run: helm unittest (this repository's new suites were not executed), Flux's remediation of an organization release that fails chart 3.0's schema, a cluster for the SSAR paths beyond unit tests, a real browser (the portal side is in the backstage record).

Review rounds

# Round Scope Reviewer Kind Result
1 Chart review (per-tool approval map) 88addb0..65ec338 (2 commits: 9576419, 65ec338) Claude Sonnet, independent code 3 findings
2 Fix round 38af12f, b4ca50d, 1ac78a6 implementer fix closed, plus the Block rule
3 Re-check of the chart fixes tool-approval clean tree; drift test run Claude Sonnet 5.5, independent re-check 3 verified
4 Slice 3 code review 33e414d, 1cabc00, 1d4a1e9 (diff base 1ac78a6) Claude Sonnet 5.5, independent; 21 mutants, all killed code 5 major, 12 minor, 1 nit across repositories
5 Slice 3 security review same commits Claude Fable 5.2, independent security 0 high, 4 medium, 7 low, 2 info
6 Fix round (slice 3) 865cc1e, 698268e, d8e8748, d0b733c, 23c0a71 implementer fix all fixed or accepted
7 Re-check of slice 3 fixes at 23c0a71; go test ./internal/... ./cmd/..., 52 mutants (41 killed, 9 survived, 2 equivalent) Claude Fable 5.2, independent re-check 15 verified, 3 partial; new: 1 major (R-02), 2 minor, 1 low, 4 nits; security 1 medium, 2 low
7b Fix b107856 implementer fix all fixed with tests
8 Lab run 2 (slice 3) image of b107856, chart 3.6.0-m2.1 tester lab all tested cases pass; 6 defects for this repository
9 Fix e437dbb implementer fix M2I-1 to M2I-5 and M2I-8 fixed
10 Slice 8 review (2.x to 3.x migrate hop) e12845b, baa1595 Claude Fable 5.2, independent; 12 mutations all fail the tests code and security 1 blocker (platform chart), 5 major, 4 minor, 1 nit in total
11 Fix round (slice 8) c7714d5, 14779f0, 0a840b6 implementer fix all fixed
12 Re-check of slice 8 fixes at 0a840b6; 28 mutations, 7 PoC tests; go test ./internal/migrate/ ./cmd/ ./internal/agents/ Claude Fable 5.2, independent re-check all verified; new: 1 major (R-01), minors
13 Fix fe1fa5b, 6f81a3b implementer fix R-01, R-02, R-05, R-06, R-09 fixed
14 Lab run 3 (slice 8) image of 6f81a3b, migrate image tester lab no agent that asked stops asking; 2 defects for this repository
15 Fix 396abc4, c37db43 implementer fix M3I-2 and M3I-3 fixed
16 OSS-neutrality audit added lines read-only audit audit 13 findings (internal references in code and docs, fixture names); fixed in 722a53b
17 Fix d7e8044 implementer fix an exact chart version pin is read as its major
18 Final delta review, Go services 23c0a71..0c9f683 in full (b107856, e437dbb, fe1fa5b, 6f81a3b, 396abc4, c37db43, 722a53b, d7e8044, 77f765e, 0c9f683); migrate only as a diff against 0a840b6; go build, go vet, go test, helm lint; 32 mutants (28 killed, 1 equivalent, 3 survived) Claude Fable 5.2, independent code and security 0 high; for this repository D-GO-08 (low [sec]), D-GO-12, 13, 14 (minor), D-GO-19 (nit), D-GO-22, 23 (info), plus the migrate half of D-GO-03 (major, operational)
19 Fix a56072e (migrate rewrites organization releases and writes a ready mark; TargetMajor reads every alternative), 9396637 (tests) implementer fix D-GO-03 (migrate half), D-GO-08, 12, 13 fixed
20 Re-check of the delta fixes at 9396637; go test ./internal/... ./cmd/...; 12 mutants, all killed Claude Fable 5.2, independent re-check D-GO-08, 12, 13 verified, D-GO-03 verified with residuals; new D-GO-30 (minor): the window before the operator moves the source can be longer than its poll
21 Fix 0356597 implementer fix the ready mark names the releases it covers; the other two cases documented
22 Final re-check at 0356597; go test ./internal/migrate; 6 mutants (5 killed, 1 equivalent) Claude Fable 5.2, independent re-check D-GO-30 (c) verified, (a) and (b) documented; no new finding in this repository
23 Manual test and fix: default agent session start fdae6d1, 984f2d8; agentlab with the image of 984f2d8 implementer, tester fix and lab a Session with the default agent was refused (its release is not named after it); lookup by the Flux labels of the Agent, read rights by name; lab check passes
24 Remote target for the default agent c1d8abb implementer feature an agent whose release is on another cluster binds from the configuration of agent-manager; not lab-tested (the lab has no remote target)
25 Last review 0356597..c1d8abb (fdae6d1, 984f2d8, c1d8abb); PoC tests (2 reproduce L-01); go build, go vet, go test, helm lint; 22 mutants (16 killed, 6 survived) Claude Fable 5.2, independent security 0 high; L-01 (medium [sec]), L-13 (info), L-15 (nit) for this repository
26 Fix cd3b3a1 implementer fix L-01 fixed

What was checked

Area Method By
Names in the chart map versus tools registered (git grep over the Go source) identical sets (31 of 31); drift test TestChartApprovalMapNamesTheRegisteredTools passes rounds 1, 3
Chart rendering helm lint; default, rule=Block, rule=Deny (refused by the schema), approval=null rounds 1, 3
Spec conformance of agents, grants, sender, REST and OpenAPI against the contract read of the full diff round 4
Concurrency: grants ConfigMap store (optimistic resourceVersion), save and start races, binding index, drop endpoint read, mutation rounds 4, 5, 7
Hop safety: can migrate loosen approval? every path from a 2.x release with muster.requireApproval: true to its 3.x state (writable, GitOps, organization, valuesFrom, hand edits, schema off, running Sessions) traced, mutated, probed rounds 10, 12
Tests go test ./internal/... ./cmd/..., go build, go vet, gofmt; go test -race ./... and golangci-lint 0 issues for the milestone 3 fixes (implementer) rounds 4, 7, 12, 13

Findings

Chart (milestone 1)
ID Severity Title Outcome Re-check
M1-agent-manager-01 major update_agent ships Allow; governed asks for update_agent_access, which did not exist yet obsolete: on governed, agent-manager is governed and only its reads are safe; trusted stays Allow all by design verified
M1-agent-manager-02 minor Allow on grant and destroy tools for agent callers in both modes obsolete: governed asks; muster floors ask in both modes for add_organization_member, set_organization_model, set_organization_egress_policy, replace_organization_credential, set_organization_connector; trusted stays Allow verified
M1-agent-manager-03 nit nothing ties the map to the registered tools fixed in 1ac78a6 (Go drift test, run by the re-check) verified
Slice 3 (agent approval settings and grants), findings that changed this repository
ID Severity Title Outcome Re-check
M2-S3-C-02 major settings accepted and reported as live while nothing enforces them by default fixed in 865cc1e, 698268e, d8e8748, d0b733c: chart default on; settings refused unsupported without the sender; start refused approval_unavailable when settings cannot be bound; approvalEnforced reported partial: the header is client-asserted (R-06); org namespaces (R-02)
M2-S3-C-04 major revoking a grant can silently fail to reach running Sessions fixed in 865cc1e, 698268e, d8e8748, 23c0a71: three tries with backoff; durable pendingSessionSync marker re-sent on the next start, save, read and at start; sessionsUpdated and warnings in results verified
M2-S3-C-05 major get_agent, list_agents and REST change tools in place; OpenAPI describes the old shape fixed in d8e8748: tools is the bindings again; the tool list is toolSettings; OpenAPI updated verified
M2-S3-C-06 minor new sender breaks every bind against a muster without slice 3 fixed in d8e8748 (fall back only for agents without settings; refuse a start with settings naming the muster needed) verified
M2-S3-C-07 minor cannot tell a muster that ignores agentTools from one with nothing to grant fixed in d8e8748 (requires the echo with the matching entry count) verified
M2-S3-C-08 minor set_agent_approval replaces the whole list from its own earlier read fixed in d8e8748, 23c0a71 (conflict, expectedGeneration) verified
M2-S3-C-09 minor a concurrent session start can drop grants a save is about to keep fixed in d8e8748 (only a lower generation is stale) verified
M2-S3-C-10 minor 16 KiB bind budget too small fixed in d8e8748 (64 KiB; three tests fail at 16 KiB) verified
M2-S3-C-14 minor grants trusted from any writer of ConfigMaps in the release namespace fixed in 698268e, 865cc1e (own namespace, Role limited to it, records checked on read; no HMAC, RBAC is the boundary) verified; note the chart now creates a Namespace and a Role outside the release namespace, untested on a cluster
M2-S3-C-15 minor other callers of update_agent still send access fields partly fixed: agent-skills updated; the lab proofs and the portal follow in the same release train partial
M2-S3-C-17 minor chart support read from the registry's latest chart, not the release's revision fixed in d8e8748 (running chart version decides; settings refused naming it) verified
M2-S3-C-18 nit smaller items (store shape, undecodable records, regrant drop unreported) fixed in 865cc1e, d8e8748 partial (regrant report), then fixed with a test
M2-S3-S-02 medium update_agent takes access fields under another letter case fixed (addStrict refuses every undeclared key on the four tools; schemas additionalProperties: false) verified
M2-S3-S-03 medium settings accepted and reported while nothing binds them fixed as C-02 verified
M2-S3-S-04 medium a failed grant drop is never retried fixed as C-04 verified
M2-S3-S-05 low grant store shares ConfigMaps of the platform namespace fixed as C-14 verified
M2-S3-S-06 low grants on server:, preset:, default are open-ended; generation pins only the spec fixed: grants record the tools they covered; keep compares the tool set verified
M2-S3-S-09 low skill URLs with credentials reach the access log fixed (userinfo refused and redacted) verified
M2-S3-S-11 low a start racing a save deletes the fresh grant fixed (TestASessionStartedDuringASaveLosesTheDroppedMark) verified
M2-S3-S-13 info smaller notes (no redirects followed, verified email as grantor) accepted or verified partial
M2-S3-R-02 major tool approval on by default refuses every Session start in an organization namespace fixed in b107856 (read the release as the caller when the ServiceAccount may not; refused only when neither may) not re-checked; Session start there verified in the lab run 3
M2-S3-R-03 minor list_approval_grants without a namespace and the startup sweep skip organization namespaces fixed in b107856 (range over all managed namespaces; unreadable ones counted, never named) not re-checked
M2-S3-R-05 low a deleted agent's pending record drops the marks of an agent recreated under the same name fixed in b107856 (sends the live agent's grants as keep) not re-checked
M2-S3-R-07 minor fixes without a failing test (9 surviving mutants) fixed in b107856 (ten tests, a Service.Start hook) not re-checked
M2-S3-R-nits nit stale comment, mark comparison without tools fixed in b107856 (TestARecheckComparesTheMarksTools) not re-checked
M2-S3-R-01 / R-04 / R-06 medium, low, low sender-less unbind then bind; drop endpoint cost; header client-asserted fixed in muster; agent-manager sends the sender header on unbind (b107856) not re-checked
Slice 8 (migrate hop), findings that changed this repository
ID Severity Title Outcome Re-check
M3-S8-03 major (security medium) Sessions running across the upgrade keep a binding without default: Ask while the kagent flag is gone fixed in c7714d5 (a Session of an agent with requireApproval: true is bound with default: Ask) verified; narrow residual: requireApproval carried only in valuesFrom
M3-S8-05 major a release with spec.valuesFrom is rewritten from spec.values alone fixed in 14779f0 (never written, reported failed with what to change) verified
M3-S8-06 major organization namespaces: sources move at once, migrate neither rewrites nor reports there fixed in 14779f0 (read, never written; reported with diff; holds the run) partly: see R-01
M3-S8-07 minor 3.x values written while the source is still on 2.x fixed in 14779f0 (holdUnmovable) verified
M3-S8-08 minor requireApproval: null fails the release with a wrong reason fixed in 14779f0 verified
M3-S8-09 minor the hop's tests validate against a hand-made 3.0 schema fixed in 14779f0 (the chart's own schema; swapping the embedded chart for 3.0.0 is a release gate) verified
M3-S8-11 nit report says set for a value it did not set fixed in 14779f0 verified
M3-S8-R-01 major an Agent in any organization namespace keeps the run in the expand phase for good fixed in fe1fa5b (TestV3OrganizationOnTargetDoesNotHoldTheRun) not re-checked
M3-S8-R-02 minor a valuesFrom release never converges, also when it already runs on 3.x fixed in fe1fa5b not re-checked
M3-S8-R-03 minor the regression test of S8-04 passes without the fix fixed in the agent chart repository n/a
M3-S8-R-05 minor (security low) a 2.x range bounded by a 3.0.0 pre-release renders; Flux serves chart 3.0 fixed in fe1fa5b (TargetMajor probes next-major pre-releases) not re-checked
M3-S8-R-06 minor an unreadable organization namespace fails the run after writes fixed in fe1fa5b (everything discovered before the first write) not re-checked
M3-S8-R-09 nit majors 0 to 99 probed; surviving mutants fixed in fe1fa5b (three tests added) not re-checked
M3I-2 (lab) medium (fail closed) a writable release gets 3.x values while a GitOps sibling's diff holds the source on 2.x fixed in 396abc4 (a sibling with diff holds the writes) not re-checked
M3I-3 (lab) medium (reporting) an organization release on a source URL different from migrate's chart URL is skipped silently fixed in 396abc4 (a source naming the same chart counts; other sources warned) not re-checked
M2I-1 to M2I-5, M2I-8 (lab) medium to low chart source not followed (chart picked from the wrong source); delete result lacks dropped; log lacks counts; create reports approvalEnforced: false early; forbidden text; plain-HTTP warning in-cluster fixed in e437dbb (tools or toolset by the namespace's chart source; approvalEnforcement enforced, not-enforced, pending; https bindings URL with CA; warning only outside the cluster) not re-checked
OSS-audit docs, tests internal issue and plan references in comments, docs and errors; fixture names fixed in 722a53b not re-checked
Final reviews: delta review, re-checks, default agent and last review (findings for this repository)
ID Severity Title Outcome Re-check
D-GO-03 (migrate half) major (operational) an organization release that still carries muster.requireApproval fails chart 3.0's schema when the operator moves the organization's source before migrate rewrote it fixed in a56072e, 0356597: migrate rewrites the organization releases it owns by the managed rules, holds GitOps ones behind their diff, and marks the organization ready with the releases the mark covers; the operator moves the source on that mark only verified with residuals: the window until the operator rolls out with the new range and polls; a failed write or a late release needs a manual re-run (kubectl create job --from=cronjob/<release>-agent-manager-migrate)
D-GO-08 low [sec] TargetMajor read 3.0.1 || 2.6.0 as major 2, and refused >=2.6.1 <2.6.9, 2.6.1 - 2.6.5, = 2.6.1, ~2.250 fixed in a56072e: every version a range names is probed verified
D-GO-12 minor [sec] two untested guards in recreatedAgentGrants (same UID, stale generation) fixed in 9396637 verified
D-GO-13 minor the "source URL differs, so the chart takes no tools" branch is untested fixed in 9396637 verified
D-GO-14 minor create compares the source URL exactly while migrate recognises an organization source on another registry by chart name; on a mirror every create writes toolset and refuses approval settings open: fails closed, by trace not run not addressed
D-GO-19 nit [sec] ClusterLocal treats any host with at most one dot as in-cluster, so a plain-http warning for the sender token is suppressed for such a host open: warning only not addressed
D-GO-22 info [sec] a valuesFrom release already on 3.x is unchanged with a warning; migrate cannot see whether requireApproval became default: Ask or was deleted open: relies on chart 3.x refusing the key n/a
D-GO-23 info [sec] the error of reading the MCPServer is dropped in the valuesFrom check open: muster still applies the rendered X-Muster-Tool-Approval header, so nothing is lifted (by trace) n/a
D-GO-30 minor the window between migrate's write and the operator's move is longer than its poll in three cases (c) fixed in 0356597 (the mark names the releases); (a) and (b) documented in the README verified; an agent-manager from before 0356597 writes no list, so the operator then holds every organization that has releases
DA-01 defect (manual test) a Session with the default agent was refused: the release that renders it is not named after the Agent, so agent-manager found none; the retry then failed on the spent request id fixed in fdae6d1 (release found by the Agent's Flux labels, which must name a release that renders that very Agent), 984f2d8 (read rights on the platform's releases by name); the request id answers a clear conflict agentlab check passes (four cases)
L-01 medium [sec] whoever may edit an Agent decided which release's settings its Sessions bind, by pointing the Agent's Flux labels at a release of their own fixed in cd3b3a1: a platform-rendered agent binds only the release the platform lists for it and is refused with other or missing labels; any other agent accepts a labelled release only in its own namespace under its own name the PoC is now a test (fails before); not re-checked. The optional admission policy on the labels was not added
L-13 info [sec] (a) agent chart 2.x renders no header, so after a release change a Session binds the older configuration until agent-manager rolls out; (b) with tool approval off a start proceeds unchecked when the Agent is unreadable to every reader; (c) the conflict answer matches kagent's message text open: (a) closes with chart 3.x; nothing found that these lift n/a
L-15 nit surviving mutants without a test: a labelled release with spec.kubeConfig accepted; a muster key other than requireApproval and enabled accepted in platformAgents; the label's namespace not compared on the remote path; an invalid header setting read as a setting open

Lab verification

Run Result
Run 2 (slice 3), image b107856 agent tool list stored and rendered (X-Muster-Tool-Approval), refusals (Allow over an Ask, default: Allow, tools with toolset), grants by a connector admin recorded and enforced, non-admin refused, floors and governed Ask never lifted, list_approval_grants per person, saving clears and running Sessions lose the mark, delete_agent cleanup (marks and ConfigMaps), expectedGeneration conflicts through muster and the portal backend. Organization-namespace Session start was not exercised (the organization's chart copy served an older chart)
Run 3 (slice 8), image 6f81a3b, migrate image five 2.x agents (requireApproval with and without binding, no model, GitOps-owned, organization) migrated to default: Ask; GitOps release reported as a diff, never written; the second run is a no-op; an organization Session started and was bound default: Ask; a running Session asked across the upgrade; chart 3.0 refuses requireApproval with the schema skipped. Not testable: valuesFrom releases (admission refuses them in the lab)

Default agent check (image of 984f2d8, chart 3.6.0-m3.2, agent-platform _helpers.tpl hunk on top of the lab floors):

Case Result
a user without rights on the platform's releases starts a Session with the default agent passes: the Session is bound with the agent's settings and answers
the platform's release patched to default: Ask (temporary) passes: the Session binds default=Ask
a Session on that agent calls a tool passes: the call asks (the tool is Allow on its connector, so the ask is the agent's default: Ask)
cleanup the patch removed, the Sessions deleted

The refused-start conflict and the portal's key rotation are covered by unit tests. Never run: the remote-target path (c1d8abb), the organization hop with the operator moving the source after a56072e.

Open items

Findings still open or partly fixed:

Item Severity What remains Why it is acceptable now
D-GO-03 residuals major, mitigated between migrate's write and the operator's move (until its rollout with the new range, then its poll) a rewritten organization release's 2.x upgrade fails and keeps its asking revision; a failed write or a late release needs a manual re-run fails closed (the release keeps running and asks); documented in the README and UPGRADE.md; what Flux's remediation does with the failed upgrades was never run
D-GO-14 minor on a registry mirror every create writes toolset and refuses approval settings fails closed
D-GO-19 nit [sec] the plain-http warning for the sender token is suppressed for a host with one dot warning only
D-GO-22, D-GO-23 info [sec] a valuesFrom release on 3.x is not checked for default: Ask; an unreadable MCPServer skips the header check chart 3.x refuses requireApproval; muster applies the rendered header
L-01 medium [sec], fixed the admission policy on the Agent's Flux labels was not added; the fix needs an agent-manager release with the new flag before the platform chart's range admits it the flag fails closed; the platform chart lists the default agent's release
L-13 info [sec] the 2.x header gap, an unchecked start with tool approval off and an unreadable Agent, a conflict matched by kagent's message text nothing found that these lift; (a) closes with chart 3.x
L-15 nit four surviving mutants in the new lookup and the remote-target parser each fails closed
Embedded chart swapping the embedded agent chart (2.6.1) for 3.0.0 is a release gate for the 3.x hop listed as a release step; the hop validates against 3.0's own schema
Placeholder floors the platform chart's floors for agent-manager are placeholders until the release owned by the platform chart; the guard refuses 3.x ranges while unset
valuesFrom requireApproval: true carried only in valuesFrom is not seen when binding a running Session narrow; the release is reported and held, and the Session asks anyway once muster applies the re-rendered header
M2-S3-C-15 minor the lab proofs and the portal still call the old update shape until the portal side ships same release train; the PR description lists the order
delete_agent in commit mode keeps grants documented
Old CRD a chart applied before muster's CRD upgrade needs a forced reconcile documented in the README and the platform chart's UPGRADE.md
File sizes muster and this repository have files over 400 lines pre-existing; a split is a separate refactor

Never run:

  • helm unittest (chart tests were reproduced with helm template; the suites added for platformReleases, platformAgents and tool approval were not executed), helm-docs.
  • A remote-target cluster: the platformAgents path of c1d8abb, and the default agent with a release on another cluster.
  • Flux's remediation of organization releases that fail chart 3.0's schema, and the hop with a real organization after the operator's gate.
  • Flux, SSAR and TokenReview behaviour on a real cluster beyond the lab; a real Valkey only in the lab; kagent's real answer for a spent request id.
  • A real browser (portal side).

@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record — update

Part of giantswarm/giantswarm#38902. Covers only what is new since the record above (tip cd3b3a1). Branch tool-approval is now 38 commits on 88addb0, tip dec1567. 3 commits since: 04af9ca, 9f903f4, dec1567.

Read this first

  • New since the record: 9f903f4 binds the Agent's display name (its display-name annotation) with the session binding, so muster can name the agent in approval prompts; muster takes the name only from this sender-bound binding. 04af9ca normalizes values.schema.json (formatting, no change in meaning). dec1567 condenses docs.
  • Independently reviewed (Claude Fable 5.2): 9f903f4 in the last check of everything after cd3b3a1. 0 critical, 0 high, no finding of its own in this repository beyond LC-15 below.
  • Not independently re-checked: dec1567 (docs and values comments only) and 04af9ca (CI formatting).
  • Not run by anyone: golangci-lint, a cluster run of the display name with an Agent whose annotation is set by an editor other than the platform.

Review rounds

# Round Scope Reviewer Kind Result
27 Lab: final rollout image of 9f903f4 tester lab the prompt reads "General Assistant wants to run Get info in Agent Manager" and the portal view carries agent.displayName; kagent's own status text still shows the technical name (kagent's wrapper)
28 Last check cd3b3a1..9f903f4; go build, go vet (agents, muster), go test ./internal/... pass; 3 mutants (1 killed, 2 survived) Claude Fable 5.2, independent code and security 0 critical, 0 high; LC-04 (muster's wording; agent-manager's own message deliberately unchanged), LC-15 (nit)
29 Fix 04af9ca, dec1567 implementer fix and docs schema formatting; docs condensed

Open items

ID Severity What is open
LC-04 (this repository) low [sec] agent-manager's own approval message (session_approval.go) still starts with the display name; muster's prompt now keeps the frame <display name> (<namespace>/<name>), so the line every client shows is covered there
LC-15 nit Two surviving mutants without a test: the display name kept when muster takes no agent; the platform agent's display name

@QuentinBisson

Copy link
Copy Markdown
Contributor

Review supplement for giantswarm/giantswarm#38902

Reviewed head: b6240d0815056d9b2f9ed6699e5b6778994142db (rechecked unchanged). Compared the epic, linked PRD and subsequent design decisions with the implementation and existing local review record. Focus: agent tool grammar, grant authority/storage, session binding/revocation, migration, identity and chart/RBAC wiring. This supplements those reviews; it does not claim to rerun their tests or independently verify every generated fixture/test assertion.

Spec

Concurrent start/save must never retain a dropped grant. The failed final-read path violates that explicit PRD contract; independent refutation found no later guaranteed repair.

This is a scoped contract assessment, not an exhaustive numbered acceptance score. Independent focused specification cross-checks covered the core enforcement/client contracts and platform/manager integration. Declared follow-ups and accepted design changes are not counted as new defects.

Blocking

  1. [P1] Fail the start if its post-bind grant recheck cannot establish current grants. session_approval.go:333, called without an error result by sessions.go:942: a start snapshots an Allow grant; a concurrent non-admin save removes it and successfully PATCHes muster, clearing its pending sync; the delayed start then binds its stale grant. If the final store Get fails, recheckBoundGrants logs and returns, and the session is handed out successfully. No pending record is installed on that failure, while sweeps resend only pending records, so the revoked grant can persist until another update or binding expiry and bypass the connector's Ask. Propagate the failure and abandon/unbind the session, or establish durable revocation reconciliation before returning it. Test the order drop PATCH → stale Bind → failed recheck Get. The existing successful-recheck and failed-PATCH tests do not cover this order.

Each blocking finding survived an independent attempt to disprove its reachable path and existing guards.

Non-blocking

None newly established.

Suggestions

None beyond the existing review follow-ups.

Deep verification

Aspect Status Evidence / limit
Problem confirmed on base n/a: feature slice The diff introduces the approval-related contract reviewed here; no claim of a locally reproduced base failure.
Fix addresses named root cause partial The findings above leave claimed contracts unmet.
Spec criteria met qualitative; no exhaustive score See Spec above.
Tests pin the contract gaps TestASessionStartedDuringASaveLosesTheDroppedMark covers the successful recheck, not failure after a late bind.
Correct (edge cases) gaps noted See findings; runtime behavior unverified.
Standard mechanism existing patterns used Kubernetes identity/preconditions and centralized muster enforcement; PRD grants and agent settings.
Standard names sourced MCP/Kubernetes identifiers and PRD terminology; no new naming finding.
Security boundaries gap Gap in grant revocation; connector-admin authority, UID/generation binding and compatibility acknowledgment inspected.
Simplest fix retain approach, repair gaps Keep the grant/binder design but fail closed when the final recheck cannot establish current grants.
Reuse check no new duplication finding Existing surrounding helpers/patterns inspected within the stated scope.
CI checks green reported checks / skips See CI note below.
Pipeline gates unverified locally PR code execution prohibited in this session.
Findings 1 blocking / 0 non-blocking / 0 suggestions Findings above supplement the existing review record.
Merge danger one-way door persisted grants, migrated agent values and active session policy.

Reported checks passed or were skipped; no failed/cancelled check to triage. A skipped job is not evidence that its gate ran.

Unverified locally: applicable builds, tests (including race/integration/envtest), vet, formatting/lint/pre-commit, generators, Makefile verification targets, Helm rendering/schema/unit checks, and browser/live-cluster flows. No PR code was executed. GitHub-reported CI provides supporting evidence, not a local reproduction. Large test, fixture and documentation changes were inspected selectively; this is a focused deep review of the contracts above, not exhaustive line-by-line coverage.

Recommendation: changes required.

Team context: none.

@QuentinBisson

Copy link
Copy Markdown
Contributor

A2A and cross-repository design follow-up

Reviewed b6240d0815056d9b2f9ed6699e5b6778994142db. No new proven protocol blocker; the previously reported post-bind grant-revocation failure remains.

The pinned a2a-go/v2 v2.9.0 identifies protocol 1.0. Against A2A v1.0.0, existing version service parameters and task/context continuation are consistent with the examined contracts. Arbitrary A2A-client interoperability is not complete: giantswarm/giantswarm#39569 explicitly records that a session created directly through the A2A edge lacks the muster binding and its first tool call is Unauthorized. This is a deferred integration gap, not a demonstrated approval bypass or, by itself, a violation of the spec's optional context-creation behavior. Do not claim all A2A clients can start usable sessions until its acceptance criteria are met.

Non-blocking: give the three chart-major classifiers one explicit contract. The Go classifiers in agent-manager and operator, and the Helm helper, duplicate finite-probe range classification with different limits. For >=100.0.0 <102.0.0, the Go code derives only 100 (missing admissible 101), while Helm emits none. This is a source-derived example, not an executed test, and does not affect the current 2→3 migration. Avoid presenting the functions as general equivalent semver classifiers: constrain and document the supported grammar/range, reject unsupported inputs, and share conformance fixtures across all three consumers. Masterminds/semver already supplies matching, but Check alone does not prove which majors a range intersects. A new service or broad abstraction is unnecessary.

The split of manager-owned grants, muster-owned enforcement and platform-managed release policy is appropriate. Keeping response tools as existing MCP bindings and adding toolSettings for approval selectors avoids a compatibility-breaking semantic rename. The release/connector UID and generation checks are necessary domain identity, not unnecessary complexity. The next simplification should make bind/revocation failure fail closed, rather than introduce extra domain frameworks.

Verification: static source and published-spec review only; no PR code executed. Local builds, tests/race tests, lint, Helm gates, browser flows and independent-client interoperability remain unverified. Heads were rechecked unchanged. This supplements the earlier deep-review verdict and does not clear its blockers.

A start bound with a grant a concurrent save dropped kept it when the final
grants read failed or the pending mark kept conflicting. The recheck now
answers an error and the start unbinds and abandons the session.
Document the range grammar migrate reads and refuse a range that names or
admits a chart major of 100 or more instead of reading its majors short, as
the operator and the agent-platform chart do.
A range bounded below 100.0.0 names major 100 without admitting it and stays
supported.
…zation ready mark

The agent-platform-operator can then hold an organization's chart source when
a release was recreated under the same name or its spec changed after the run.
@Rotfuks

Rotfuks commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Review record — Quentin's review

Part of giantswarm/giantswarm#38902. Answers the review of 2026-11-27 (comments below). Branch tool-approval tip 2f67c08; 5 commits since the last record (dec1567): b6240d0 (docs link), 355df4b, d244752, 48ed659, 2f67c08.

ID Point Outcome
QB-03 recheckBoundGrants logs and returns when the final grants read fails or conflicts run out, so a start can hand out a session with a grant just revoked fixed in 355df4b: a recheck that cannot read the grants, cannot mark them pending or keeps conflicting refuses the start, unbinds and deletes the session; regression test (dropped PATCH, stale bind, failed recheck read)
QB-05 Migration readiness compares release names only fixed in 2f67c08 (operator side: giantswarm/agent-platform-operator#74): the ready mark records each release's UID and generation, re-running migrate clears it; unit tests
QB-07 The three chart-major classifiers differ on finite-probe range limits small version in d244752, 48ed659: grammar documented, ranges admitting a major of 100 or more refused, a test. Shared conformance fixtures stay a follow-up
QB-15 Direct A2A session creation lacks the muster binding (giantswarm/giantswarm#39569) accepted, known limitation: not an approval bypass. The PR does not claim arbitrary A2A client support. Tracked in giantswarm/giantswarm#39569

Independent re-check

Claude Fable, 2026-11-28, detached worktree at 2f67c08, read-only, fixes reverted in turn and the tests rerun.

ID Verdict Evidence
QB-03 fixed mutating the read-failure and conflict branches and the Unbind call each fails TestAStartWhoseRecheckFailsIsRefusedAndUnbound
QB-05 fixed UID and generation recorded as read or as the write left them; mutants (UID only, generation only, missing versions, post-write version) each fail a test
QB-07 done, small version mutation fails a test (TestTargetMajor)

go test ./internal/agents ./internal/migrate green. envtest not run by the checker.

Open items

ID Severity What is open
N-3 low session_approval.go:352-353: the non-conflict Replace error branch has no test (mutant survives); the test asserts the unbind, not the session delete
N-4 low generation does not move when a ConfigMap or Secret behind valuesFrom changes, so that edit after the run is not seen (see operator#74); approval fails closed
QB-07 follow-up shared classifier fixtures across agent-manager, agent-platform-operator and agent-platform

@Rotfuks

Rotfuks commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@QuentinBisson thanks for the thorough review (your comment). Addressed: QB-03 fixed in 355df4b, QB-05 in 2f67c08 (with the operator), QB-07 in d244752 and 48ed659 (shared fixtures stay a follow-up). QB-15 is a known limitation, tracked in giantswarm/giantswarm#39569.

Details and the independent re-check are in the review record.

Main dropped internal/identity for mcp-oauth's UserInfo: the approval code
uses agents.RequestedBy/UserAttr and idtoken, the caller-kind mark moves to
the agents package (attachCallerKind in the OAuth chain) and an approval
grant's grantedBy reads EmailVerified from the UserInfo. The split update
tools, set_agent_approval and list_approval_grants address an
organization's agents by its name like main's other agent tools.
mustermcp's meta-tool session relays URL elicitations for every call.
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — merge round

Part of giantswarm/giantswarm#38902. Reviewer: Claude Fable 5.2, independent of the implementing and merging model, read-only, verdicts formed from the code. Full review: reviews/final/merge-round-2-review.md in the epic's workspace.

Covers the merge of main ae9bbdf (clean; #496, #499, #500, .nancy-ignore). Result: 0 blocker, 0 high, 0 medium, 0 low, 2 info.

Run: go build ./..., go vet ./..., go test ./... (pass).

@Rotfuks
Rotfuks merged commit 2a243ed into main Nov 30, 2026
20 checks passed
@Rotfuks
Rotfuks deleted the tool-approval branch November 30, 2026 16:23
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — merge of main before release

Merge 1782f0d of origin/main (9040931, 38d94b2, e87331f, 786ea86) into tool-approval checked by Claude Fable 5.2, read-only: no finding, nothing to fix in the released rc. No hand resolution (git show --cc is empty), and the squash 2a243ed0 has the same tree as the merge. go build, go vet and go test -count=1 ./... pass (22 packages).

  • Shared files: in cmd/serve.go and internal/agents/service.go main changes only the OrganizationContent signature (it now returns the Namespace's Flux labels with the content path); the approval flags, Config fields, session sync and toolApprovalFloor wiring are untouched hunks.
  • Commit-mode saves (R2-AM-02): main changes namespaceLocation, the target of a new agent. A settings save of an existing agent goes through releaseLocation, which main does not touch, so who can reach the save that drops grants is as it was. A new agent has no grants to drop, and a commit-mode save still keeps none (approval.go:402).
  • Grants and settings: read from the HelmRelease, not from the Kustomization labels main now follows for the commit target.
  • Operator v0.5.0: builds and tests pass; the migrate hop is not in main's diff.
  • Info, main's own: where the caller may not read an organization Namespace, the commit target follows the labels agent-manager's ServiceAccount reads; the Kustomization and its source are still read as the caller. Not approval code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants